package org.ymh.unix_file_system.domain;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Foundation {
    @Value("${file_system_size}")
    public long fileSystemSize;
    @Value("${super_block_start}")
    public int superBlockStart;
    @Value("${super_block_count}")
    public int superBlockCount;
    @Value("${inode_block_start}")
    public int inodeBlockStart;
    @Value("${inode_block_count}")
    public int inodeBlockCount;
    @Value("${root_dir_block_start}")
    public int rootDirBlockStart;
    @Value("${root_dir_block_count}")
    public int rootDirBlockCount;
    @Value("${data_block_start}")
    public int dataBlockStart;
    @Value("${inode_size}")
    public byte inodeSize;
    @Value("${dir_item_size}")
    public byte dirItemSize;
    @Value("${block_size}")
    public byte blockSize;
    @Value("${blocks_path}")
    public String blocksPath;
    @Value("${index_path}")
    public String indexPath;
    @Value("${free_block_linked_list_stack_max_size}")
    public int stackMaxSize;
    @Value("${dir_occupy_block_size}")
    public byte dirOccupyBlockSize;
    @Value("${init_file_system}")
    public boolean initFileSystem;
    @Value("${block_number_occupy_size}")
    public byte blockNumberOccupySize;
    @Value("${single_file_max_size}")
     public int singleFileMaxSize;
    public Foundation(){}

    public int getSingleFileMaxSize() {
        return singleFileMaxSize;
    }

    public void setSingleFileMaxSize(int singleFileMaxSize) {
        this.singleFileMaxSize = singleFileMaxSize;
    }

    @Override
    public String toString() {
        return "Foundation{" +
                "fileSystemSize=" + fileSystemSize +
                ", superBlockStart=" + superBlockStart +
                ", superBlockCount=" + superBlockCount +
                ", inodeBlockStart=" + inodeBlockStart +
                ", inodeBlockCount=" + inodeBlockCount +
                ", rootDirBlockStart=" + rootDirBlockStart +
                ", rootDirBlockCount=" + rootDirBlockCount +
                ", dataBlockStart=" + dataBlockStart +
                ", inodeSize=" + inodeSize +
                ", dirItemSize=" + dirItemSize +
                ", blockSize=" + blockSize +
                ", blocksPath='" + blocksPath + '\'' +
                ", indexPath='" + indexPath + '\'' +
                ", stackMaxSize=" + stackMaxSize +
                ", dirOccupyBlockSize=" + dirOccupyBlockSize +
                ", initFileSystem=" + initFileSystem +
                ", blockNumberOccupySize=" + blockNumberOccupySize +
                '}';
    }

    public long getFileSystemSize() {
        return fileSystemSize;
    }

    public void setFileSystemSize(long fileSystemSize) {
        this.fileSystemSize = fileSystemSize;
    }

    public int getSuperBlockStart() {
        return superBlockStart;
    }

    public void setSuperBlockStart(int superBlockStart) {
        this.superBlockStart = superBlockStart;
    }

    public int getSuperBlockCount() {
        return superBlockCount;
    }

    public void setSuperBlockCount(int superBlockCount) {
        this.superBlockCount = superBlockCount;
    }

    public int getInodeBlockStart() {
        return inodeBlockStart;
    }

    public void setInodeBlockStart(int inodeBlockStart) {
        this.inodeBlockStart = inodeBlockStart;
    }

    public int getInodeBlockCount() {
        return inodeBlockCount;
    }

    public void setInodeBlockCount(int inodeBlockCount) {
        this.inodeBlockCount = inodeBlockCount;
    }

    public int getRootDirBlockStart() {
        return rootDirBlockStart;
    }

    public void setRootDirBlockStart(int rootDirBlockStart) {
        this.rootDirBlockStart = rootDirBlockStart;
    }

    public int getRootDirBlockCount() {
        return rootDirBlockCount;
    }

    public void setRootDirBlockCount(int rootDirBlockCount) {
        this.rootDirBlockCount = rootDirBlockCount;
    }

    public int getDataBlockStart() {
        return dataBlockStart;
    }

    public void setDataBlockStart(int dataBlockStart) {
        this.dataBlockStart = dataBlockStart;
    }

    public byte getInodeSize() {
        return inodeSize;
    }

    public void setInodeSize(byte inodeSize) {
        this.inodeSize = inodeSize;
    }

    public byte getDirItemSize() {
        return dirItemSize;
    }

    public void setDirItemSize(byte dirItemSize) {
        this.dirItemSize = dirItemSize;
    }

    public byte getBlockSize() {
        return blockSize;
    }

    public void setBlockSize(byte blockSize) {
        this.blockSize = blockSize;
    }

    public String getBlocksPath() {
        return blocksPath;
    }

    public void setBlocksPath(String blocksPath) {
        this.blocksPath = blocksPath;
    }

    public String getIndexPath() {
        return indexPath;
    }

    public void setIndexPath(String indexPath) {
        this.indexPath = indexPath;
    }

    public int getStackMaxSize() {
        return stackMaxSize;
    }

    public void setStackMaxSize(int stackMaxSize) {
        this.stackMaxSize = stackMaxSize;
    }

    public byte getDirOccupyBlockSize() {
        return dirOccupyBlockSize;
    }

    public void setDirOccupyBlockSize(byte dirOccupyBlockSize) {
        this.dirOccupyBlockSize = dirOccupyBlockSize;
    }

    public boolean isInitFileSystem() {
        return initFileSystem;
    }

    public void setInitFileSystem(boolean initFileSystem) {
        this.initFileSystem = initFileSystem;
    }

    public byte getBlockNumberOccupySize() {
        return blockNumberOccupySize;
    }

    public void setBlockNumberOccupySize(byte blockNumberOccupySize) {
        this.blockNumberOccupySize = blockNumberOccupySize;
    }
}
